<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/24
 * Time: 16:18
 */

//array_merge:合并一个或多个数组
$arr = ['黄焖鸡','麻辣烫','手撕鸡'];
$brr = ['八宝粥','铸币'];
print_r(array_merge($arr,$brr));

//array_push:添加元素进数组末尾
echo '<br />';
array_push($brr,'拌面');
print_r($brr);

//count
echo '<br />';
echo count($brr);

//in_array
echo '<br />';
if(in_array('黄焖鸡',$arr)){
    echo '已找到黄焖鸡';
}else{
    echo '未找到黄焖鸡';
}

//rtrim
echo '<br />';
$crr = '门前大桥下，游过一群鸭，快来快来数一数，二四六七八';
echo rtrim($crr,'七八');

//trim
echo '<br />';
echo trim($crr,'门前大桥下');

//ltrim
echo '<br />';
echo ltrim($crr,'门前大');

//strtolower
echo '<br />';
$drr = 'AbCdEfG';
echo strtolower($drr);

//strtoupper
echo '<br />';
echo strtoupper($drr);

//explode
echo '<br />';
print_r(explode('，',$crr));

//implode
echo '<br />';
echo implode($arr);

//str_replace
echo '<br />';
echo str_replace('世界','PHP','你好，世界');

//strlen
echo '<br />';
echo strlen($crr);

//mb_strlen
echo '<br />';
echo mb_strlen($crr);

//substr
echo '<br />';
echo substr($drr,5);

//mb_substr
echo '<br />';
echo mb_substr($crr,5);

//md5
echo '<br />';
$err = '123456';
echo md5($err);

